EXE=bin/open_gl
BUILDS=build/nehegl_glut.o build/tga.o build/mathlib.o
FILES=src/nehegl_glut.cpp include/frames.h include/tga.h src/tga.cpp src/mathlib.cpp include/mathlib.h

all: $(EXE)

run: $(EXE)
	cd bin
	$(EXE)

$(EXE): $(BUILDS)
	g++ -o $(EXE) $(BUILDS) -lGL -lGL -lglut
	
	
#Builds

$(BUILDS): $(FILES)
	g++ -o build/nehegl_glut.o -c -I include src/nehegl_glut.cpp
	g++ -o build/tga.o -c -I include src/tga.cpp
	g++ -o build/mathlib.o -c -I include src/mathlib.cpp

clean:
	rm -f $(BUILDS)
	rm -f $(EXE)
